<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		
		<style type="text/css">
			.box1{
				color: aqua;
			}
			
			.box2{
				width: 100px;
				height: 100px;
				background: yellowgreen;
			}
		</style>
	</head>
	<body>
		<h1 id="h1" style="font-size: 16px;"  class="box1"> dom操作属性 </h1>
		
		
		input:<input  type="submit" id="sub"  name="submit" value="提交"/>
		
		
		<script type="text/javascript">
			//获取元素
			let hEle = document.getElementById('sub');
			//获取name属性值
			hEle.name = '张三';
			// alert(hEle.name)
			
			//获取元素
			let h1Ele = document.getElementById('h1');
			// alert(h1Ele.className)
			
			// alert(h1Ele.style.fontSize)
			h1Ele.style.fontSize = '72px';
			
			
		</script>
		
	</body>
</html>
